#ifndef __FFMPEG_AUDIO_QUEUE__
#define __FFMPEG_AUDIO_QUEUE__

#include <iostream>
#include <queue>

extern "C"
{
#include <pthread.h>
}

using namespace std;

//#define MAX_AUDIO_BUFFER_SIZE (1024 * 1024 * 3)

typedef struct
{
    unsigned char *buffer;
    //unsigned char buffer[MAX_AUDIO_BUFFER_SIZE];
    unsigned int buffer_size;
} audio_data_packet;

class audioQueue
{
public:
    audioQueue();
    ~audioQueue();
    pthread_mutex_t queue_mutex;
    pthread_cond_t queue_cond;
    queue<audio_data_packet *> audio_queue;
    int putAudioDataToQueue(audio_data_packet *audio_packet);
    audio_data_packet *getAudioDataFromQueue();
    int getAudioQueueSize();
};

#endif
